//
//  NotifyingClass.m
//  TextApp
//
//  Created by panos on 16/11/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "NotifyingClass.h"

@implementation NotifyingClass

- (IBAction)giefData:(id)sender
{

	//float rad, circum;
	
	//*arr = [self generateValue:rad];
	
	//NSLog(@"%f, %f\n",rad, circum);
	
	[array1 addObject: [NSNumber numberWithFloat:[self generateValue:rad]]];
	//[radius addObject: rad];
	
	//NSLog(@"%f\n",[array1 objectAtIndex:0]);
	//i++;
	
}

- (IBAction)massCalc:(id)sender
{
	counter = [array1 count];
	
	for(i=0; i<counter; i++)
	{
		NSLog(@"%f, %f\n", [radius objectAtIndex:i], [array1 objectAtIndex:i]);
		[textView insertText:
		 [NSString stringWithFormat:
		  @"The circumference of %.4f is: %f\n", [radius objectAtIndex:i], [array1 objectAtIndex:i] ]];
	}
}

- (float)generateValue:(float *)originalValue
{
	float value = [textField floatValue];
	*originalValue = value;
	return [MathUtilities circumferenceFromRadius:value];
}

@end
